<template>
	<div class="demo">
		<h2>学校信息</h2>
		<h3>名称：{{name}}</h3>
		<h3>地址：{{address}}</h3>
		<button @click="showSchoolInfo">点我提示信息</button>
	</div>
</template>

<script>
	export default {
		name:'School',
		data() {
			return {
				name:'尚硅谷',
				address:'宏福科技园'
			}
		},
		methods: {
			showSchoolInfo(){
				alert(this.name+this.address)
			}
		},
	}
</script>

<style scoped>
	.demo{
		background-color: skyblue;
		padding: 20px;
	}
</style>